package asteroid

type Adapt interface {
	Register(identity string, key string, node string) error
	UnRegister(identity string) error
	Monitor(identity string, key string, join func(node string), leave func(node string), finish func()) error
	UnMonitor(identity string) error
	Close() error
	Connecting() bool
}
type LocalAdapt struct {
	connecting bool

	count int
}

func (a *LocalAdapt) Close() error {
	a.connecting = false
	a.count = 0
	return nil
}
func (a *LocalAdapt) Register(identity string, key string, node string) error {
	a.connecting = true
	return nil
}

func (a *LocalAdapt) UnRegister(identity string) error {
	a.connecting = true
	return nil
}

func (a *LocalAdapt) Monitor(identity string, key string, join func(node string), leave func(node string), finish func()) error {
	a.connecting = true
	return nil
}

func (a *LocalAdapt) UnMonitor(identity string) error {
	a.connecting = true
	return nil
}

func (a *LocalAdapt) Connecting() bool {
	return a.connecting
}
